﻿using System;
using System.Collections;

using GameServer.Virtual_Objects.User;

using GameServer.Managers;

namespace GameServer.Networking.Packets
{
    class PACKET_END_GAME_AI : Packet
    {
        public PACKET_END_GAME_AI(Virtual_Objects.Room.virtualRoom Room)
        {
            newPacket(30048);
            addBlock(1);
            if (Room.Wave >= 22)
                addBlock(1);
            else
                addBlock(0);
            addBlock(122000);
            ArrayList Players = Room.Players;
            addBlock(Players.Count); // Player count
            foreach (Virtual_Objects.User.virtualUser Player in Players)
            {
                addBlock(Player.RoomSlot); // Slot
                addBlock(Player.rKills); // Kills
                addBlock(Player.rDeaths); // Deaths
                addBlock(Player.rFlags); //Flags
                addBlock(Player.rPoints); // Points
                addBlock(Player.DinarEarned); // Dinar
                addBlock(Player.ExpEarned); // Exp
                addBlock(Player.Exp); // Player Exp
            }
            addBlock(0);
        }
    }
}